Skip to content

travis: Fix failing travis tests on main#6152

Merged
nvazquez merged 3 commits into
apache:mainfrom
shapeblue:fix-travis-test
Mar 23, 2022
Merged

travis: Fix failing travis tests on main#6152
nvazquez merged 3 commits into
apache:mainfrom
shapeblue:fix-travis-test

Conversation

@Pearl1594

Copy link
Copy Markdown
Contributor

Description

This PR addresses #6115
Prior fix:

$ nosetests --with-xunit --xunit-file=results.xml --with-marvin --marvin-config=setup/dev/advanced.cfg  -s -a tags=advanced --hypervisor=simulator test/integration/component/test_project_limits.py 

==== Marvin Init Started ====

=== Marvin Parse Config Successful ===

=== Marvin Setting TestData Successful===

==== Log Folder Path: /tmp/MarvinLogs/Mar_22_2022_12_45_24_WIEMY4. All logs will be available here ====

=== Marvin Init Logging Successful===

==== Marvin Init Successful ====
=== TestName: test_maxAccountNetworks | Status : EXCEPTION ===

=== TestName: test_maxAccountNetworks | Status : EXCEPTION ===

=== TestName: test_01_project_limits | Status : SUCCESS ===

=== TestName: test_02_project_limits_normal_user | Status : SUCCESS ===

=== TestName: test_03_vm_per_project | Status : SUCCESS ===

=== TestName: test_04_publicip_per_project | Status : FAILED ===

=== TestName: test_05_snapshots_per_project | Status : SUCCESS ===

=== TestName: test_06_volumes_per_project | Status : EXCEPTION ===

=== TestName: test_07_templates_per_project | Status : SUCCESS ===

=== TestName: test_07_templates_per_project | Status : EXCEPTION ===

===final results are now copied to: /tmp/MarvinLogs/test_project_limits_JSZASI===
[12:50:20] pearl@pearl-XPS-15-7590:~/lab/shapeblue/cloudstack$ vi /tmp/MarvinLogs/test_project_limits_JSZASI/results.txt                                

$ nosetests --with-xunit --xunit-file=results.xml --with-marvin --marvin-config=setup/dev/advanced.cfg  -s -a tags=advanced --hypervisor=simulator test/integration/component/test_resource_limits.py 

==== Marvin Init Started ====

=== Marvin Parse Config Successful ===

=== Marvin Setting TestData Successful===

==== Log Folder Path: /tmp/MarvinLogs/Mar_22_2022_13_09_38_XXJETC. All logs will be available here ====

=== Marvin Init Logging Successful===

==== Marvin Init Successful ====
=== TestName: test_maxAccountNetworks | Status : SUCCESS ===

=== TestName: test_01_vm_per_account | Status : SUCCESS ===

=== TestName: test_02_publicip_per_account | Status : FAILED ===

=== TestName: test_03_snapshots_per_account | Status : SUCCESS ===

=== TestName: test_04_volumes_per_account | Status : SUCCESS ===

=== TestName: test_05_templates_per_account | Status : SUCCESS ===

=== TestName: test_01_publicip_per_domain | Status : FAILED ===

=== TestName: test_01_vm_per_domain | Status : SUCCESS ===

=== TestName: test_03_snapshots_per_domain | Status : SUCCESS ===

=== TestName: test_04_volumes_per_domain | Status : SUCCESS ===

=== TestName: test_05_templates_per_domain | Status : SUCCESS ===

===final results are now copied to: /tmp/MarvinLogs/test_resource_limits_4GD1ST===

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)

Feature/Enhancement Scale or Bug Severity

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

$ nosetests --with-xunit --xunit-file=results.xml --with-marvin --marvin-config=setup/dev/advanced.cfg  -s -a tags=advanced --hypervisor=simulator test/integration/component/test_project_limits.py 

==== Marvin Init Started ====

=== Marvin Parse Config Successful ===

=== Marvin Setting TestData Successful===

==== Log Folder Path: /tmp/MarvinLogs/Mar_22_2022_13_03_09_I9KF2Z. All logs will be available here ====

=== Marvin Init Logging Successful===

==== Marvin Init Successful ====
=== TestName: test_maxAccountNetworks | Status : SUCCESS ===

=== TestName: test_01_project_limits | Status : SUCCESS ===

=== TestName: test_02_project_limits_normal_user | Status : SUCCESS ===

=== TestName: test_03_vm_per_project | Status : SUCCESS ===

=== TestName: test_04_publicip_per_project | Status : SUCCESS ===

=== TestName: test_05_snapshots_per_project | Status : SUCCESS ===

=== TestName: test_06_volumes_per_project | Status : SUCCESS ===

=== TestName: test_07_templates_per_project | Status : SUCCESS ===

===final results are now copied to: /tmp/MarvinLogs/test_project_limits_HJ63QW===

$ nosetests --with-xunit --xunit-file=results.xml --with-marvin --marvin-config=setup/dev/advanced.cfg  -s -a tags=advanced --hypervisor=simulator test/integration/component/test_resource_limits.py 

==== Marvin Init Started ====

=== Marvin Parse Config Successful ===

=== Marvin Setting TestData Successful===

==== Log Folder Path: /tmp/MarvinLogs/Mar_22_2022_13_32_35_7B5VRA. All logs will be available here ====

=== Marvin Init Logging Successful===

==== Marvin Init Successful ====
=== TestName: test_maxAccountNetworks | Status : SUCCESS ===

=== TestName: test_01_vm_per_account | Status : SUCCESS ===

=== TestName: test_02_publicip_per_account | Status : SUCCESS ===

=== TestName: test_03_snapshots_per_account | Status : SUCCESS ===

=== TestName: test_04_volumes_per_account | Status : SUCCESS ===

=== TestName: test_05_templates_per_account | Status : SUCCESS ===

=== TestName: test_01_publicip_per_domain | Status : SUCCESS ===

=== TestName: test_01_vm_per_domain | Status : SUCCESS ===

=== TestName: test_03_snapshots_per_domain | Status : SUCCESS ===

=== TestName: test_04_volumes_per_domain | Status : SUCCESS ===

=== TestName: test_05_templates_per_domain | Status : SUCCESS ===

===final results are now copied to: /tmp/MarvinLogs/test_resource_limits_X5R7SR===

@Pearl1594

Copy link
Copy Markdown
Contributor Author

@blueorangutan package

@Pearl1594 Pearl1594 added this to the 4.17.0.0 milestone Mar 22, 2022
@Pearl1594 Pearl1594 linked an issue Mar 22, 2022 that may be closed by this pull request
@Pearl1594

Copy link
Copy Markdown
Contributor Author

@blueorangutan package

@Pearl1594 Pearl1594 marked this pull request as ready for review March 22, 2022 11:59
try:
#Clean up, terminate the created network offerings
cleanup_resources(self.apiclient, self.cleanup)
cleanup_resources(self.apiclient, reversed(self.cleanup))

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can consider super(TestProjectLimits, self).tearDown()

try:
#Cleanup resources used
cleanup_resources(cls.api_client, cls._cleanup)
cleanup_resources(cls.api_client, reversed(cls._cleanup))

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can consider super(TestProjectLimits, cls).tearDownClass()

@DaanHoogland DaanHoogland left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some remarks (and what Wei said)

Comment on lines -741 to -748
with self.assertRaises(Exception):
PublicIPAddress.create(
self.apiclient,
zoneid=virtual_machine_1.zoneid,
services=self.services["server"],
networkid=network.id,
projectid=self.project.id
)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

aren't those part of the test purpose; that it throws an exception when trying to create a public IP?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it constantly fails with an Assertion Error stating - no exception raised @DaanHoogland

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, wonder why this assertion is in there than. If it is supposed to succeed, we are fine.

for network in networks:
self.cleanup.append(Network(network.__dict__))

self.cleanup.append(self.project_1)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it shouldn't be added to cleanup with so much posibilities of exceptions in between.

account=self.account.name,
domainid=self.account.domainid
)
self.cleanup.append(self.project_1)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why shouldn't the project be cleaned?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is cleaned @DaanHoogland but at a later stage, as first the networks need to be cleaned up. As the tests failed with such errors - Can't delete the project yet because it has 1 Network to clean up

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it shouldn't be added to the clean list with other statements inbtween. This means exceptions can occur before it is added. It must be added immediately.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the errors are because the list isn't processed in reverse. the call to super takes care of that.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @DaanHoogland , I'll update the tests with @weizhouapache 's suggestion of using super.

@weizhouapache weizhouapache left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code lgtm

travis tests results pass 💯

@nvazquez

Copy link
Copy Markdown
Contributor

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@nvazquez a Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

@blueorangutan

Copy link
Copy Markdown

Packaging result: ✔️ el7 ✔️ el8 ✔️ debian ✔️ suse15. SL-JID 2966

@nvazquez nvazquez left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - no smoke tests needed, Travis tests are good now thanks @Pearl1594

@nvazquez nvazquez merged commit f5e77f7 into apache:main Mar 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

travis tests failed in 4.16/main

6 participants